package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.common.constant.StatusConstants;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysUserDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description: 类描述
 * @Author: zhoukeyao    //作者
 * @CreateDate: 2025/3/30 00:45	//创建时间
 * @UpdateUser: 更新人
 * @UpdateDate: 2025/3/30 00:45	//更新时间
 */
@Service
public class SysUserDeptServiceImpl implements ISysUserDeptService {
    @Autowired
    private SysUserMapper userMapper;

    @Override
    public boolean hasUserByDeptId(Long deptId) {
        return new LambdaQueryChainWrapper<>(userMapper)
                .eq(SysUser::getDeptId, deptId)
                .exists();
    }
}
